<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script charset="utf-8" src="/static/kindeditor/kindeditor-all.js"></script>
    <script charset="utf-8" src="/static/kindeditor/lang/zh-CN.js"></script>
</head>

<body>
    <!--<input type="text" id="f" name="f" value="" />
    <input type="button" id="btn" name="btn" value="提交" />-->
    <textarea id="editor_id" name="content" style="width:700px;height:300px;">
			&lt;strong&gt;HTML内容&lt;/strong&gt;
	</textarea>
    <script src="/bck/static/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
        KindEditor.ready(function(K) {
            /*var arr=[
                'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
                'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
                'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
                'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
                'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
                'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
                'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
                'anchor', 'link', 'unlink', '|', 'about'
            ];*/
            var editor = K.create('#editor_id',{
                width:'1000px',//设置编辑器的宽
                //items:['undo', 'redo']	只出现两个undo	后退redo	前进按钮
                //items:arr,	设置工具栏的按钮
                uploadJson : '/ajax.php?ajax=upload',	//文件上传程序
                fileManagerJson : '/ajax.php?ajax=file_manager',	//浏览服务器图片空间
                allowFileManager : true,//启用图片空间按钮
            });

            $('#btn').click(function(){
                $.ajax({
                    type:"post",
                    url:"/ajax.php?ajax=work",
                    data:{
                        php:$('#f').val()
                    },
                    success:function(mgs){
                        console.log(mgs);
                    }
                });
            });
        });
    </script>
</body>
</html>